ParameterFieldDefinition Object

The ParameterFieldDefinition Object represents a parameter field in the report. This object provides properties and methods for retrieving information and setting options for a parameter field in your report (that is, current value, default value, etc.). A ParameterFieldDefinition Object is obtained from the Field property of the Area Object when the specified field is a parameter field.

ParameterFieldDefinition Object Properties

Property Description Read/Write

Application

Returns a reference to the Application Object, that this object is associated with.

Read only

CurrentValue

Returns the value entered by the user or when set using SetCurrentValue. If the user clicked Cancel or no value is set, a null is returned.

Read only

CurrentValueSet

Boolean value that will equal TRUE (1) if the user enters a value at the prompt or a value has been set using SetCurrentValue and FALSE (0) if the user clicks Cancel or no value has been set.

Read only

DefaultValue

Returns the default value assigned to the parameter field if one was set. If DefaultValueSet is FALSE, a null is returned.

Read only

DefaultValueSet

Returns Boolean value indicating whether or not a default value was set for the parameter field when the parameter field was created or modified in Crystal Reports. The value can be either TRUE (1) if the field was given a default value or FALSE (0) if it was not.

Read only

Kind

Returns CRFieldKind (see table below) which specifies what "kind" of field (database, summary, formula, etc.).

Read only


Constant Value


crDatabaseField

1


crFormulaField

2


crGroupNameField

5


crParameterField

6


crSpecialVarField

4


crrSQLExpressionField

1


crSummaryField

3

Name

Returns the name of the parameter field as it appears in the Parameter Field list on the Parameter Tab of the Insert Fields dialog box (for example, NewExampleParameter).

Read only

NeedsCurrentValue

Returns Boolean value indicating if the parameter needs a value entered (no current value is set). TRUE if no current value is set; FALSE if current value is set.

Read only

NumberOfBytes

Returns the number of bytes required to store the field data in memory.

Read only

ParameterField
Name

Returns the name of the parameter field as it is displayed (referenced) in the report (that is, {?ExampleParameter}).

Read only

Parent

Reference to the Parent object (Report Object).

Read only

Prompt

Returns/Sets the prompting text, if any, that appears when the user runs the report for the first time or refreshes the data. This will be either the prompt assigned by the user when the parameter field was inserted into the report or the prompt that was set from code.

Read/Write

Report

Reference to Report Object.

Read only

ReportName

Returns the subreport name if the parameter is part of a subreport; otherwise, a null is returned.

Read only

ValueType

Returns CRFieldValueType (see table below), which specifies the "type" of value found in the field.

Read only


Constant Value


crBitmapField

17


crBlobField

15


crBooleanField

9


crChartField

21


crCurrencyField

8


crDateField

10


crDateTimeField

16


crIconField

18


crInt16sField

3


crInt16uField

4


crInt32sField

5


crInt32uField

6


crInt8sField

1


crInt8uField

2


crNumberField

7


crOleField

20


crPersistentMemoField

14


crPictureField

19


crStringField

12


crTimeField

11


crTransientMemoField

13


crUnknownField

22



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com